//
//  UIView+Extension.swift
//  BTE
//
//  Created by Mike Zhang on 2025/8/18.
//

import UIKit

class BTEBaseCollectionView: UICollectionView {

    override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
        super.init(frame: frame, collectionViewLayout: layout)
        configure()
    }

    required init?(coder: NSCoder) {
        super.init(coder: coder)
        configure()
    }

    private func configure() {
        showsHorizontalScrollIndicator = false
        showsVerticalScrollIndicator = true
        isPagingEnabled = false
        alwaysBounceVertical = true
        contentInset = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10)

        if #available(iOS 11.0, *) {
            contentInsetAdjustmentBehavior = .never
        }
    }
}
